﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class NSFVisualizer : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //call to the function to populate checkboxlist from xml
            BindXMLintoCBL();
        }
    }

    //populates the checkboxlist from xml file
    public void BindXMLintoCBL()
    {
        DataSet ds = new DataSet();
        ds.ReadXml(MapPath("CDFNSF.xml"));

        DataView dv = ds.Tables["selectable"].DefaultView;
        //dv.Sort = "text";

        attributes.DataTextField = "text";
        attributes.DataValueField = "text";

        attributes.DataSource = dv;
        attributes.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //data for sending the info to the visualizer
    }
}